home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / basic / comndlgs.zip / DOS_ERR.BAS < prev   
BASIC Source File  |  1992-07-25  |  4KB  |  59 lines

  1. DefInt A-Z
  2.  
  3. Function CmdError$ (x&)
  4.     If x& = 32765 Then
  5.         PError$ = "#" + LTrim$(Str$(x&)) + ",  " + "Common dialog function failed during initialization (not enough memory?)."
  6.     ElseIf x& = 32761 Then
  7.         PError$ = "#" + LTrim$(Str$(x&)) + ",  " + "Common dialog function failed to load a specified string."
  8.     ElseIf x& = 32760 Then
  9.         PError$ = "#" + LTrim$(Str$(x&)) + ",  " + "Common dialog function failed to load a specified resource."
  10.     ElseIf x& = 32759 Then
  11.         PError$ = "#" + LTrim$(Str$(x&)) + ",  " + "Common dialog function failed to lock a specified resource."
  12.     ElseIf x& = 32758 Then
  13.         PError$ = "#" + LTrim$(Str$(x&)) + ",  " + "Common dialog function unable to allocate memory for internal data structures."
  14.     ElseIf x& = 32757 Then
  15.         PError$ = "#" + LTrim$(Str$(x&)) + ",  " + "Common dialog function unable to lock memory associated with a handle."
  16.     ElseIf x& = 32755 Then
  17.         PError$ = "#" + LTrim$(Str$(x&)) + ",  " + "Cancel was selected."
  18.     ElseIf x& = 32752 Then
  19.         PError$ = "#" + LTrim$(Str$(x&)) + ",  " + "Couldn't allocate memory for FileName or Filter."
  20.     ElseIf x& = 32751 Then
  21.         PError$ = "#" + LTrim$(Str$(x&)) + ",  " + "The call to WinHelp failed.  Check the Help property values."
  22.     ElseIf x& = 28671 Then
  23.         PError$ = "#" + LTrim$(Str$(x&)) + ",  " + "The PD_RETURNDEFAULT flag was set in the Flags member of PRINTDLG data structure, but either hDevMode or hDevNames field were nonzero."
  24.     ElseIf x& = 28670 Then
  25.         PError$ = "#" + LTrim$(Str$(x&)) + ",  " + "Load of the required resources failed."
  26.     ElseIf x& = 28669 Then
  27.         PError$ = "#" + LTrim$(Str$(x&)) + ",  " + "The common dialog function failed to parse the strings in the [devices] section of the WIN.INI file."
  28.     ElseIf x& = 28668 Then
  29.         PError$ = "#" + LTrim$(Str$(x&)) + ",  " + "The PD_RETURNDEFAULT flag was set in the Flags member of PRINTDLG data structure, but either hDevMode or hDevNames field were nonzero."
  30.     ElseIf x& = 28667 Then
  31.         PError$ = "#" + LTrim$(Str$(x&)) + ",  " + "The PRINTDLG function failed to load the specified printer's device driver."
  32.     ElseIf x& = 28666 Then
  33.         PError$ = "#" + LTrim$(Str$(x&)) + ",  " + "The printer device-driver failed to initialize a DEVMODE data structure (print driver written for WIN 3.0 or later)."
  34.     ElseIf x& = 28665 Then
  35.         PError$ = "#" + LTrim$(Str$(x&)) + ",  " + "The PRINTDLG function failed during initialization."
  36.     ElseIf x& = 28664 Then
  37.         PError$ = "#" + LTrim$(Str$(x&)) + ",  " + "No printer device-drivers were found."
  38.     ElseIf x& = 28663 Then
  39.         PError$ = "#" + LTrim$(Str$(x&)) + ",  " + "A default printer does not exist."
  40.     ElseIf x& = 28662 Then
  41.         PError$ = "#" + LTrim$(Str$(x&)) + ",  " + "The data in the DEVMODE and DEVNAMES data structrues describes two different printers."
  42.     ElseIf x& = 28661 Then
  43.         PError$ = "#" + LTrim$(Str$(x&)) + ",  " + "The PRINTDLG function failed when it attempted to create an information context."
  44.     ElseIf x& = 28660 Then
  45.         PError$ = "#" + LTrim$(Str$(x&)) + ",  " + "The [devices] section of the WIN.INI file does not contain an entry for requested printer."
  46.     ElseIf x& = 24574 Then
  47.         PError$ = "#" + LTrim$(Str$(x&)) + ",  " + "No fonts exist.  Must set internally to CF_BOTH, CF_PRINTERFONTS or CF_SCREENFONTS."
  48.     ElseIf x& = 20478 Then
  49.         PError$ = "#" + LTrim$(Str$(x&)) + ",  " + "An attempt to subclass a listbox failed due to insufficient memory."
  50.     ElseIf x& = 20477 Then
  51.         PError$ = "#" + LTrim$(Str$(x&)) + ",  " + "File name is invalid."
  52.     ElseIf x& = 20476 Then
  53.         PError$ = "#" + LTrim$(Str$(x&)) + ",  " + "The buffer at which the member lpstrFile points to is too small."
  54.     Else
  55.         PError$ = "Unknow Printer Error:  #" + Str$(x&)
  56.     End If
  57. End Function
  58.  
  59.